package fnic.prehand.esagent;


import org.apache.commons.configuration.ConfigurationException;
import org.elasticsearch.client.Client;
import org.elasticsearch.node.NodeBuilder;
import fnic.prehand.common.AgentConfig;

public class EsAgent {
	//es配置
	protected static final AgentConfig config = AgentConfig.getInstance();
	protected static volatile Client client;
	
	static{
		client = NodeBuilder.nodeBuilder().clusterName(config.getEsClusterName()).client(true).node().client();
	}
	
	public static Client getClient(){
		return client;
	}
}
